package RoomPanel;

import gui.HouseEditor;

public class RoomPanelRemover {

	public static void remove(int id) {
		removePanel(id);
	}

	private static void removePanel(int id) {
		for (int i = 0; i < HouseEditor.panels.size(); i++) {
			if (HouseEditor.panels.get(i).getPanelID() == id) {
				HouseEditor.getInstance().RoomBuilder.remove(HouseEditor.panels
						.get(i));
				HouseEditor.panels.remove(i);
				HouseEditor.getInstance().RoomBuilder.repaint();
				Aproach.computeCount(HouseEditor.panels);
				break;
			}
		}
	}

}
